-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: bump curve25519-dalek from 3.2.1 to 4.1.3 #2252
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: samkim-crypto <[email protected]>
Co-authored-by: samkim-crypto <[email protected]>
Co-authored-by: samkim-crypto <[email protected]>
Co-authored-by: samkim-crypto <[email protected]>
thank you @samkim-crypto. it looks good! |
Backports to the beta branch are to be avoided unless absolutely necessary for fixing bugs, security issues, and perf regressions. Changes intended for backport should be structured such that a minimum effective diff can be committed separately from any refactoring, plumbing, cleanup, etc that are not strictly necessary to achieve the goal. Any of the latter should go only into master and ride the normal stabilization schedule. Exceptions include CI/metrics changes, CLI improvements and documentation updates on a case by case basis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, it looks good to me! Let's just double check with @joncinque and @ilya-bobyr before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just a couple of comments to clarify things.
It is a bit annoying to have to use the profile override, since downstream devs will need to do the same thing in their workspace, but I can't come up with a better solution.
echo "[profile.dev.package.curve25519-dalek] | ||
opt-level = 3" >> Cargo.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than overriding this, let's wait for solana-labs/solana-program-library#7220 to land
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure! looks like it has been merged and removed the hack f1d4168 🫡
[profile.dev.package.curve25519-dalek] | ||
opt-level = 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you give more of an explanation about why this is added? I suggested this language in the SPL PR, but feel free to improve or clarify it:
curve25519-dalek uses the
simd
backend by default in v4 if possible, which has very slow performance on some platforms with opt-level 0, which is the default fordev
andtest
builds. This slowdown causes certain interactions in the solana-test-validator, such as verifying ZK proofs in transactions, to take much more than 400ms, creating problems in the testing environment.
To enable better performance in solana-test-validator during tests and dev builds, we override the opt-level to 3 for the crate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added! 7ba52fa
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me, thanks!
* bump curve25519-dalek from 3.2.1 to 4.1.3 * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update Cargo.toml Co-authored-by: samkim-crypto <[email protected]> * remove opt level hack * add comment for opt level --------- Co-authored-by: samkim-crypto <[email protected]> (cherry picked from commit 6e23e69) # Conflicts: # Cargo.lock # Cargo.toml # programs/sbf/Cargo.lock
Hey all, thanks for merging this in. Just for the sake of estimation, any idea as to when it might get released? Thanks! |
* bump curve25519-dalek from 3.2.1 to 4.1.3 * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update Cargo.toml Co-authored-by: samkim-crypto <[email protected]> * remove opt level hack * add comment for opt level --------- Co-authored-by: samkim-crypto <[email protected]> (cherry picked from commit 6e23e69) # Conflicts: # Cargo.lock # Cargo.toml # programs/sbf/Cargo.lock
ok, but this same issue causes the same problem on the |
for reference what I talking about re: the
I get that when I have the following two lines in my Cargo.toml:
but when I remove the |
* bump curve25519-dalek from 3.2.1 to 4.1.3 * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update .github/scripts/downstream-project-spl-common.sh Co-authored-by: samkim-crypto <[email protected]> * Update Cargo.toml Co-authored-by: samkim-crypto <[email protected]> * remove opt level hack * add comment for opt level --------- Co-authored-by: samkim-crypto <[email protected]>
Problem
we did this bump in #1693, but it seems like we have some concerns that broke the semver convention. I revered it in #2055.
Summary of Changes
try to bump it again